import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: '/discovery'
      },
      {
        // 发现音乐
        path: '/discovery',
        name:'discovery',
        component: resolve=>require(['@/views/01.discovery'],resolve)
    
      },
       {
        // 推荐歌单
        path: '/playlists',
        name:'playlists',
        component: resolve=>require(['@/views/02.playlists'],resolve)
      },
      {
        // 推荐歌单
        path: '/playlist',
        name:'playlist',
        component: reslove=>require(['@/views/06.playlist'],reslove)
      },
      {
        // 最新音乐
        path: '/songs',
        name:'songs',
        component: reslove=>require(['@/views/03.songs'],reslove)
      },
      {
        // 最新音乐
        path: '/mvs',
        name:'mvs',
        component: reslove=>require(['@/views/04.mvs'],reslove)
      },
      // mv详情
      {
        path: '/mv',
        name:'mv',
        component: reslove=>require(['@/views/07.mv'],reslove)
      },
      // 搜索结果页
      {
        path: '/result',
        name:'result',
        component: reslove=>require(['@/views/05.result'],reslove)
      }, 
] 
const router = new VueRouter({
  routes
})

export default router
